import java.util.List;
import java.util.ArrayList;


/**
 * @author edhem.brakmic
 * 
 */

public class TableM {
	private Object[] columnNames;
	private Object[] columnTypes;
	private Object[][] rowData;

	public TableM() {

	}

	TableM(String[] columnNames) {

		this.setColumnNames(columnNames);

	}

	TableM(String[] columnNames, Object[][] rowData) {

		this.setColumnNames(columnNames);

	}

	public void setColumnNames(Object[] objects) {
		this.columnNames = objects;
	}

	public Object[] getColumnNames() {
		return this.columnNames;
	}

	public void setRowData(Object[][] rowData) {
		this.rowData = rowData;
	}

	public void setRowData(Object[] rowDatal, int row) {

		for (int i = 0; i < rowDatal.length; i++)
			this.rowData[row][i] = rowData[i];
	}

	public Object[][] getRowData() {
		return this.rowData;
	}

	public void showData() {

		for (int i = 0; i < 163; i++) {
			for (int j = 0; j < 4; j++) {
				System.out.print(rowData[i][j]+ " ");
			}
			System.out.println();
		}

	}

	public void setColumnTypes(Object[] columnTypes) {
		this.columnTypes = columnTypes;
	}

	public Object[] getColumnTypes() {
		return columnTypes;
	}
	

	public Object[] getColTyp() {
		List<String> res=new ArrayList<String>();
		for (int i=0;i<columnNames.length;i++) {
			res.add(columnNames[i]+"$"+columnTypes[i]);
		}
		return res.toArray();

	}


}
